#ifndef ROOM_H
#define ROOM_H
#include "guest.h"
#include "tools.h"

class Room
{
	//房间类型
	RoomType type;
	//房间价格
	float price;
	//折扣
	uint8_t discount;
	//房间号
	uint16_t id;
	//住的天数
	unsigned int day; 
public:
	//已经住了多少人
	uint8_t cnt;
	//本房间的旅客信息
	Guest* guests;
	//设置房间
	void set_room(RoomType type,float price,uint16_t id,uint8_t discount,int day)
	{
		this->type=type;
		this->id=id;
		this->price=price;
		this->discount=discount;
		cnt=0;
		this->day=0;
		guests=new Guest[type];
	}
	//构造函数
	Room(void)
	{
		
	}
	//入住
	void ingus(const Guest that)
	{
		cout <<"----"<<endl;
		this->guests[cnt]=that;
		cnt++;
	}
	//时间到天数加一
	int get_day(void);
	//退房
	void outgus(const Guest that,int i);
	//获取房间的类型和容量
	RoomType get_type(void);
	//获取房间号
	uint16_t get_id(void);
	//获取价格信息
	float get_price(void);
};

#endif//ROOM_H
